package com.ruoyi.loan.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.ruoyi.loan.dto.LoanApplyDto;
import com.ruoyi.loan.dto.PoorStudentApplyDto;
import com.ruoyi.loan.dto.SelectUserListDto;
import com.ruoyi.loan.dto.UpdateUserMessageDto;
import com.ruoyi.loan.entity.LoanRecord;
import com.ruoyi.loan.entity.User;
import com.ruoyi.loan.vo.LoanRecordDetailVo;
import com.ruoyi.loan.vo.LoanRecordVo;

import java.util.List;

/**
 * @Author lin
 * @Date 2022/4/5 0:16
 */
public interface UserService extends IService<User> {

    /**
     * 分页获取用户的贷款记录
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo getMyLoanRecord(int pageNum, int pageSize);

    /**
     * 根据贷款id查询贷款的详细信息
     * @param id
     * @return
     */
    LoanRecordDetailVo getLoanRecordDetails(int id);

    /**
     * 贷款申请
     * @param loanApplyDto
     */
    void loanApply(LoanApplyDto loanApplyDto);

    /**
     * 贫困申请
     * @param poorStudentApplyDto
     */
    void poorStudentApply(PoorStudentApplyDto poorStudentApplyDto);

    /**
     * 修改用户个人资料
     * @param updateUserMessageDto
     */
    void updateUserMessage(UpdateUserMessageDto updateUserMessageDto);

    PageInfo selectUserList(SelectUserListDto selectUserListDto);

    void updatePassword(Integer userId, String password);

    PageInfo myPoorApplyList(Integer userId);

}
